/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package org.grnt.common;

/**
 *
 * This class is function geric.
 * @param <T>  Function input type.
 * @param <R> Function output type.
 * @author sayid
 */
public interface Function<T, R> {
	/**
	 * It is a Exception class which is thrown by Function class.
	 */
	public static class OptionExcetpion extends Exception{

		public OptionExcetpion(Throwable cause) {
			super(cause);
		}

		public OptionExcetpion(String message, Throwable cause) {
			super(message, cause);
		}

		public OptionExcetpion(String message) {
			super(message);
		}

		public OptionExcetpion() {
		}
	}
	/**
	 *
	 * It is Function class entity.
	 * @param element Input parameter
	 * @return Is the result of After doWith
	 */
	public R doWith(T element);
}
